

export default class ArrayUtil {
  /**
   * 数据交换
   * @param arr 
   * @param index1 
   * @param index2 
   */
  public static swap(arr: any[], index1: number, index2: number): void {
    let temp = arr[index1]
    arr[index1] = arr[index2]
    arr[index2] = temp
  }
}